/*
 * @Author: WangGuojian 1085844536@qq.com
 * @Date: 2022-09-09 17:14:19
 * @LastEditTime: 2022-09-13 22:14:05
 * @LastEditors: WangGuojian 1085844536@qq.com
 * @FilePath: \mybatisplus\src\main\java\com\atguigu\mybatisplus\mapper\UserMapper.java
 * @Description:
 */
package com.atguigu.mybatisplus.mapper;

import java.util.Map;

import com.atguigu.mybatisplus.pojo.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

/**
 * ClassName: UserMapper
 * Description:
 * Date: 2022/09/09 PM 5:14
 * <p>
 * project: mybatisplus
 * package: com.atguigu.mybatisplus.mapper
 * email: 1085844536@qq.com
 * version:
 *
 * @author WangGuojian
 */
@Repository
public interface UserMapper extends BaseMapper<User> {

    /**
     * 根据 id 查询用户信息为map集合
     *
     * @param id
     * @return
     */
    Map<String, Object> selectMapById(Long id);

    /**
     * 通过年龄查询用户信息并分页
     *
     * @param page Mybatis-Plus所提供的分页对象，必须位于第一个参数位置
     * @param age
     * @return
     */
    Page<User> selectPageVo(@Param("page") Page<User> page, @Param("age") Integer age);

}
